package File;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;

public class Demo1 {
    public static void main(String[] args) throws IOException, InterruptedException {
//        File file = new File("./../../test.txt");
//        File file = new File("./test.txt");

        File file = new File("./test/111/222/333");
//        File file = new File("test.txt");
//        File file = new File("./");
//        File file = new File("./../");//src的上一层
//        String parentFile = file.getParent();
//        File file = new File("C:/");

//        file.delete();
//        System.out.println(file.getParent());
//        System.out.println(file.getName());
//        System.out.println(file.getPath());
//        System.out.println(file.getAbsolutePath());
//        System.out.println(file.getCanonicalPath());
////        file.delete();
//        System.out.println(file.exists());

//        System.out.println(file.isDirectory());
//        System.out.println(file.isFile());

//        System.out.println(file.createNewFile());

//        file.deleteOnExit();
//        Thread.sleep(10000);

//        String[] pathList = file.list();
//        System.out.println(Arrays.toString(pathList));

//        File[] files = file.listFiles();
//        System.out.println(Arrays.toString(files));

//        System.out.println(file.mkdir());
        System.out.println(file.mkdirs());
    }
}
